<?php

class Usermodel extends Model{

    public function  __construct() {
        parent::Model();
    }

    public function isAuthenticated(){
        $this->db->where('username',$this->input->post('username'));
        $this->db->where('password',md5($this->input->post('password')));
        $query = $this->db->get('user');
        return $query->num_rows() == 1;
    }
}